package com.aikon.wht.concurrent;

public class SleepInterrupt implements Runnable {

	public void run() {
		
		try {
			System.out.println("Statr" + Thread.currentThread().getName());
//			System.out.println(Thread.interrupted());
			Thread.sleep(10000);
			System.out.println("After sleeping");
		} catch (InterruptedException e) {
			System.out.println("interrupted");
			System.out.println(Thread.currentThread().isInterrupted());
			
		}
		
		

	}
	
	public static void main(String[] args) throws InterruptedException{
		Thread t = new Thread(new SleepInterrupt());
		Thread.sleep(2000);
		t.start();
//		t.interrupt();
	}

}
